package com.syx.friend.Controller.file;

import com.syx.common.Model.OSSResult;
import com.syx.commoncore.Controller.BaseController;
import com.syx.commoncore.Model.Result;
import com.syx.friend.Service.IFileService;
import com.syx.friend.Service.Impl.IFileServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/file")
public class FileController extends BaseController {

    @Resource
    IFileService iFileService;
    @RequestMapping("/upload")
    public Result<OSSResult> upload(@RequestBody MultipartFile file){
        System.out.println("file");
        return iFileService.upload(file);



    }

}
